-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(react): don't set options before suspending #6611
Conversation
setting options right before suspending is a side effect, and it has repercussions if used in transitions where the component stays mounted to fix #6392 in a different way, we can't rely on `observer.getCurrentQuery()` when reading for error boundaries / suspense, because it can lag behind; instead, we can just read from the queryCache directly to get the latest values
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit a2f75bf. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit a2f75bf:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #6611 +/- ##
===========================================
+ Coverage 39.12% 56.16% +17.03%
===========================================
Files 161 99 -62
Lines 6597 4081 -2516
Branches 1297 1001 -296
===========================================
- Hits 2581 2292 -289
+ Misses 3665 1570 -2095
+ Partials 351 219 -132 ☔ View full report in Codecov by Sentry. |
we can see here that this fixes the original issue: |
setting options right before suspending is a side effect, and it has repercussions if used in transitions where the component stays mounted
to fix #6392 in a different way, we can't rely on
observer.getCurrentQuery()
when reading for error boundaries / suspense, because it can lag behind; instead, we can just read from the queryCache directly to get the latest valuesfixes #6486
fixes #6498